Back to Main Menu

MapInfo Professional: View / Edit myData live data

Create a DSN connection

  • Click File and select 'Open DBMS Connection':

  • With 'File data source' selected, click 'New':

  • Select the latest SQL Server Driver available (usually at the bottom of the list) and click next:

  • Browse to Documents/My Data Sources
  • Give the data source a name i.e. myDataProduction
  • Then click next and Finish - the new data source wizard will now open
  • Add a description and the network address of SQL Server where myData is stored

  • Select authentication type. Integrated is recommended but will require user be given SQL access on the myData database

  • Change the default database to the myData database i.e. myDataProduction
  • Select the access type. READONLY is recommended for general users

  • Click Next and Finish as settings on the last page do not need to be changed

  • Next, click 'Test Data source' to ensure all settings are correct, then click 'OK' to finalise

Connecting to a DBMS

Click File and select 'Open DBMS Connection':

With 'File data source selected';

  • Browse to Documents/My Data Sources
  • Select the data source i.e. myDataProduction
  • Then click OK - MapInfo will now connect to the data source

Connecting to myData

Open MyData database

Go to 'File > Open…' or click on the "Open DBMS Table" button  and locate the DSN connection at the bottom of the list of file types.

Select Asset Table

Choose asset category from the MyData database. This particular example uses the Buildings table.

Setup Table options

Give Asset Table a new name. Since the Buildings table already exists in MapInfo Professional,  a new table name is given to the MyData buildings asset table (e.g. BuildingAttributes).

Pick the columns - Using Standard or expert modes select the required columns from myData.

Note: MapInfo currently only supports a 4k row limit, this means that only selection of fields from the myData database can be used at any one time. 

Choose the Connection Type

MapInfo recommends using the Download Data option for datasets with infrequent changes.

 

Otherwise use Live Access to cache, noting there may be performance reductions on large datasets.

Click 'Ok' and MapInfo will open the data table.

Notes

The Tab-file MapInfo creates contains the data connection parameters for the layer.

  • A such when a workspace is distributed, the DMS connection doesn't need to be sent with it.
  • Also, the security type is best set to Trusted_Connection as this is a plain text file

MapInfo Start-up Options

To ensure your queries are saved as part of the map configuration, Mapinfo requires setting some start-up options

  • Open Preferences under Options/Preferences.

  • Select 'Startup'

  • Ensure Save Queries in Workspaces is selected

Join Data (SQL Query)

Ensure MapInfo startup options have been verified before starting this section

Create a new query to link data

Go to 'Query > SQL Query' to create a new query. This query joins data from the existing MapInfo table and the MyData asset table using common columns (Asset_No and assetID). The result is saved into a new table.

Add linked query into Map

Open up Layer Control and add the result of the linked data query from the previous step into map layers.

Hide original layer (optional)

Make the original map layer invisible to hide duplicate information.

New View in MapInfo Professional

When selecting an asset record using the Info Tool, it now shows up the linked asset information from MyData.

Editing myData Attributes in MapInfo Professional

When selecting an asset record from the layer created as a result of the Query, you may Browse the selection table to view the myData attributes.  You also able to make changes to the attributes in either the query table or the selection table.  Any changes made here are live changes on the myData database.

Refresh Data

When the table is linked is not set to live access, users can initiate a refresh of the DBMS data at any time.  This can be done be by either going to Table > Maintenance > Refresh DBMS Table... or clicking on the Refresh DBMS Table button 

 

Please note that it is recommended to Refresh DBMS Table upon reopening a MapInfo Workspace that uses Downloaded Data as the DBMS connection method.